namespace ManoMachine.IDE.Convertrs
{
    using System;
    using System.Globalization;
    using System.Windows.Data;

    public class BoleanInventionConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value is bool)
            {
                if (parameter != null && parameter.ToString() == "i")
                {
                    return !(bool)value;
                }
                return value;
            }
            return value;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}